package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author du
 * date 2018/7/28 下午10:30
 */
public class QuestionRedoResult implements Parcelable{
    /**
     * id : 70499
     * genre : 1
     * question_id : 4251
     * subject : {"problem_title":"<p>小丽想不摸到蓝色珠子，请问她应该摸第________个盒子？<\/p><p><img src=\"http://7xu137.com1.z0.glb.clouddn.com/ueditor_20161213_584f624e3905b.png\" title=\"blob.png\" alt=\"blob.png\"/><\/p>","problem_type":3,"problem_answer":[""],"problem_correct_answer":["3"]}
     * good_key : VxUJQFEMAQE
     */

    private String id;
    private String genre;
    private String question_id;
    private QuestionSubjectEntity subject;
    private String good_key;//好题本字段
    private String wrong_key;//错题本字段


    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.genre);
        dest.writeString(this.question_id);
        dest.writeParcelable(this.subject, flags);
        dest.writeString(this.good_key);
        dest.writeString(this.wrong_key);
    }

    public QuestionRedoResult() {}

    protected QuestionRedoResult(Parcel in) {
        this.id = in.readString();
        this.genre = in.readString();
        this.question_id = in.readString();
        this.subject = in.readParcelable(QuestionSubjectEntity.class.getClassLoader());
        this.good_key = in.readString();
        this.wrong_key = in.readString();
    }

    public static final Creator<QuestionRedoResult> CREATOR = new Creator<QuestionRedoResult>() {
        @Override
        public QuestionRedoResult createFromParcel(Parcel source) {return new QuestionRedoResult(source);}

        @Override
        public QuestionRedoResult[] newArray(int size) {return new QuestionRedoResult[size];}
    };
}
